<%= simple_form_for [:admin, @account_group], :defaults => { :input_html => { :class => "form-control" } },  remote: true, html: {class: 'form-horizontal' } do |f| %>
	<fieldset>
		<legend><%= title %></legend>
	  <%= f.input :group_name, label: '账号组名称'  %>
	  <%= f.input :description, label: '描述' %>
	  <%= f.input :levels, label: '用户级别' %>
	  <%= f.association :accounts, collection: Account.order('account_group_id desc').all.map{|i| [i.mobile_number,i.id] }, checked: @accounts, label: '账号', :input_html => { class: "" } %>
	  <%= f.input :default,as: :boolean, label: '默认分组', :input_html => { class: "" } %>
	  <%= f.input :is_recommander,as: :boolean, label: '司机组', :input_html => { class: "" } %>
	  <%= f.button :wrapped, value: '提 交', class: "btn btn-primary" %>
  </fieldset>
<% end %>
<%= javascript_tag do %>
  $('#account_group_account_ids').select2({width: "100%"});
<% end %>
<%= javascript_include_tag "prevent_label.js" %>